eeprom14 2.2.0
Loading...
Searching...
No Matches
EEPROM 14 Click Driver

API for configuring and manipulating EEPROM 14 Click driver. More...

Topics

 EEPROM 14 Settings
 Settings of EEPROM 14 Click driver.
 EEPROM 14 MikroBUS Map
 MikroBUS pin mapping of EEPROM 14 Click driver.

Functions

void eeprom14_cfg_setup (eeprom14_cfg_t *cfg)
 EEPROM 14 configuration object setup function.
err_t eeprom14_init (eeprom14_t *ctx, eeprom14_cfg_t *cfg)
 EEPROM 14 initialization function.
err_t eeprom14_write_memory (eeprom14_t *ctx, uint16_t address, uint8_t *data_in, uint8_t len)
 EEPROM 14 write memory function.
err_t eeprom14_read_memory (eeprom14_t *ctx, uint16_t address, uint8_t *data_out, uint16_t len)
 EEPROM 14 read memory function.
void eeprom14_write_enable (eeprom14_t *ctx)
 EEPROM 14 write-enable function.
void eeprom14_write_protect (eeprom14_t *ctx)
 EEPROM 14 write-protect function.

Detailed Description

API for configuring and manipulating EEPROM 14 Click driver.

Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.

Function Documentation

◆ eeprom14_cfg_setup()

void eeprom14_cfg_setup ( eeprom14_cfg_t * cfg)

EEPROM 14 configuration object setup function.

This function initializes Click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See eeprom14_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ eeprom14_init()

err_t eeprom14_init ( eeprom14_t * ctx,
eeprom14_cfg_t * cfg )

EEPROM 14 initialization function.

This function initializes all necessary pins and peripherals used for this Click board.

Parameters
[out]ctx: Click context object. See eeprom14_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See eeprom14_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ eeprom14_read_memory()

err_t eeprom14_read_memory ( eeprom14_t * ctx,
uint16_t address,
uint8_t * data_out,
uint16_t len )

EEPROM 14 read memory function.

This function reads a sequence of bytes from the device memory over I2C, starting at the selected 16-bit address. The read length must not exceed the page size and the transfer must not cross the device end address.

Parameters
[in]ctx: Click context object. See eeprom14_t object definition for detailed explanation.
[in]address: Start memory address (16-bit).
[out]data_out: Pointer to output data buffer.
[in]len: Number of bytes to read (max page size).
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ eeprom14_write_enable()

void eeprom14_write_enable ( eeprom14_t * ctx)

EEPROM 14 write-enable function.

This function enables write operations by driving the WP pin low.

Parameters
[in]ctx: Click context object. See eeprom14_t object definition for detailed explanation.
Returns
None.
Note
None.

◆ eeprom14_write_memory()

err_t eeprom14_write_memory ( eeprom14_t * ctx,
uint16_t address,
uint8_t * data_in,
uint8_t len )

EEPROM 14 write memory function.

This function writes a sequence of bytes to the device memory over I2C, starting at the selected 16-bit address. The write length must not exceed the page size and the transfer must not cross the device end address.

Parameters
[in]ctx: Click context object. See eeprom14_t object definition for detailed explanation.
[in]address: Start memory address (16-bit).
[in]data_in: Pointer to input data buffer.
[in]len: Number of bytes to write (max page size).
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ eeprom14_write_protect()

void eeprom14_write_protect ( eeprom14_t * ctx)

EEPROM 14 write-protect function.

This function disables write operations by driving the WP pin high.

Parameters
[in]ctx: Click context object. See eeprom14_t object definition for detailed explanation.
Returns
None.
Note
None.